<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnFavoriteInChatUserTable extends AbstractMigration
{
    public function up()
    {
        $this->table('chat_user')
            ->addColumn('mute', 'enum', ['values' => 'yes,no', 'default' => 'no', 'comment' => '是否静音'])
            ->addColumn('favorite', 'enum', ['values' => 'yes,no', 'default' => 'no', 'comment' => '是否置顶'])
            ->save();
    }

    public function down()
    {
        $this->table('chat_user')
            ->removeColumn('mute')
            ->removeColumn('favorite')
            ->save();
    }
}
